package com.wyk.Spring;

/**
 * @ClassName: BeanWrapper
 * @Description:
 * @Author: 初久
 * @Date: 2022/7/3 14:38
 **/
public class BeanWrapper {

    private Object wrappedInstance;
    private Class<?> wrappedClass;

    public BeanWrapper(Object wrappedInstance) {
        this.wrappedInstance = wrappedInstance;
    }

    public BeanWrapper(Object wrappedInstance, Class<?> wrappedClass) {
        this.wrappedInstance = wrappedInstance;
        this.wrappedClass = wrappedClass;
    }

    public Object getWrappedInstance() {
        return this.wrappedInstance;
    }

    //返回代理以后的Class
    //可能会是这个 $Proxy0
    public Class<?> getWrappedClass() {
        return this.wrappedInstance.getClass();
    }
}
